package com.bishe.demo.modules.tourism.controller;

import com.bishe.demo.modules.account.entity.User;
import com.bishe.demo.modules.common.entity.ResultEntity;
import com.bishe.demo.modules.tourism.service.SupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description SupplierController
 * @Author Lubb
 * @Date 2021/3/30 16:13
 */
@RestController
@RequestMapping("/api")
public class SupplierController {
    @Autowired
    private SupplierService supplierService;

    @PostMapping("/supplierRegister")
    public ResultEntity<User> register(@RequestBody User user){
        return supplierService.addSupplier(user);
    }
}
